package com.fable.biz.operate.enums;

import java.util.HashMap;
import java.util.Map;

public enum CustomerStatusEnum {

    gonghai("公海", 1),
    sihai("私海", 2),
    ser("服务中", 3),
    delete("已删除", -1),;

    private String desc;
    private Integer status;

    CustomerStatusEnum(String desc, Integer status) {
        this.desc = desc;
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public Integer getStatus() {
        return status;
    }

    public static CustomerStatusEnum valueOf(Integer value) {
        switch (value) {
            case 1:
                return gonghai;
            case 2:
                return sihai;
            case 3:
                return ser;
            case 4:
                return delete;
            default:
                return null;
        }
    }


    public static Map<Integer, String> getMap() {
        Map<Integer, String> map = new HashMap<Integer, String>(values().length);
        for (CustomerStatusEnum client : values()) {
            map.put(client.getStatus(), client.getDesc());
        }
        return map;
    }

}
